package com.university.logistic.config;

import org.springframework.stereotype.Component;
import springfox.documentation.swagger.web.SwaggerResource;
import springfox.documentation.swagger.web.SwaggerResourcesProvider;

import java.util.Arrays;
import java.util.List;

@Component
public class LgSwaggerResource implements SwaggerResourcesProvider {
    @Override
    public List<SwaggerResource> get() {
        return Arrays.asList(
                //getSwaggerList("评论服务","/v2/api-docs"),
               // getSwaggerList("维修服务","/product/v2/api-docs"),
                getSwaggerList("公告指南服务","/notice/v2/api-docs"),
                getSwaggerList("点餐服务","/hall/v2/api-docs")
               // getSwaggerList("商家服务","/hall/v2/api-docs"),
//                getSwaggerList("用户服务","/hall/v2/api-docs")
        );
    }
    public SwaggerResource getSwaggerList(String name,String location){
        SwaggerResource swaggerResource = new SwaggerResource();
        swaggerResource.setName(name);
        swaggerResource.setSwaggerVersion("2.0");
        swaggerResource.setLocation(location);
        return swaggerResource;
    }
}
